package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Material generated by hbm2java
 */
@Entity
@Table(name = "Material", schema = "dbo", catalog = "imgbms")
public class Material implements java.io.Serializable {

	private int id;
	private Accession accession;
	private Barcode barcode;
	private Date createdDate;
	private Integer quantity;
	private Boolean active;
	private Boolean status;
	private Integer materialTypeId;
	private Integer lineDepth;
	private String kuleuvenCode;
	private String note;
	private String bactStatus;
	private String preIndexingStatus;
	private String virusIndexingStatus;
	private int flags;
	private Set<Treatment> treatments = new HashSet<Treatment>(0);
	private Set<ActivityMaterial> activityMaterials = new HashSet<ActivityMaterial>(
			0);
	private Mtstag mtstag;
	private Set<Mtsmaterial> mtsmaterialsForChildId = new HashSet<Mtsmaterial>(
			0);
	private Set<Mtsmaterial> mtsmaterialsForMtsmaterialId = new HashSet<Mtsmaterial>(
			0);
	private Set<PreIndexingTag> preIndexingTags = new HashSet<PreIndexingTag>(0);
	private Set<PreIndexingResultTag> preIndexingResultTags = new HashSet<PreIndexingResultTag>(
			0);

	public Material() {
	}

	public Material(int id, Accession accession, int flags) {
		this.id = id;
		this.accession = accession;
		this.flags = flags;
	}

	public Material(int id, Accession accession, Barcode barcode,
			Date createdDate, Integer quantity, Boolean active, Boolean status,
			Integer materialTypeId, Integer lineDepth, String kuleuvenCode,
			String note, String bactStatus, String preIndexingStatus,
			String virusIndexingStatus, int flags, Set<Treatment> treatments,
			Set<ActivityMaterial> activityMaterials, Mtstag mtstag,
			Set<Mtsmaterial> mtsmaterialsForChildId,
			Set<Mtsmaterial> mtsmaterialsForMtsmaterialId,
			Set<PreIndexingTag> preIndexingTags,
			Set<PreIndexingResultTag> preIndexingResultTags) {
		this.id = id;
		this.accession = accession;
		this.barcode = barcode;
		this.createdDate = createdDate;
		this.quantity = quantity;
		this.active = active;
		this.status = status;
		this.materialTypeId = materialTypeId;
		this.lineDepth = lineDepth;
		this.kuleuvenCode = kuleuvenCode;
		this.note = note;
		this.bactStatus = bactStatus;
		this.preIndexingStatus = preIndexingStatus;
		this.virusIndexingStatus = virusIndexingStatus;
		this.flags = flags;
		this.treatments = treatments;
		this.activityMaterials = activityMaterials;
		this.mtstag = mtstag;
		this.mtsmaterialsForChildId = mtsmaterialsForChildId;
		this.mtsmaterialsForMtsmaterialId = mtsmaterialsForMtsmaterialId;
		this.preIndexingTags = preIndexingTags;
		this.preIndexingResultTags = preIndexingResultTags;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "accessionId", nullable = false)
	public Accession getAccession() {
		return this.accession;
	}

	public void setAccession(Accession accession) {
		this.accession = accession;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "barcodeId")
	public Barcode getBarcode() {
		return this.barcode;
	}

	public void setBarcode(Barcode barcode) {
		this.barcode = barcode;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "createdDate", length = 23)
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@Column(name = "quantity")
	public Integer getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	@Column(name = "active")
	public Boolean getActive() {
		return this.active;
	}

	public void setActive(Boolean active) {
		this.active = active;
	}

	@Column(name = "status")
	public Boolean getStatus() {
		return this.status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	@Column(name = "materialTypeId")
	public Integer getMaterialTypeId() {
		return this.materialTypeId;
	}

	public void setMaterialTypeId(Integer materialTypeId) {
		this.materialTypeId = materialTypeId;
	}

	@Column(name = "lineDepth")
	public Integer getLineDepth() {
		return this.lineDepth;
	}

	public void setLineDepth(Integer lineDepth) {
		this.lineDepth = lineDepth;
	}

	@Column(name = "kuleuvenCode", length = 50)
	public String getKuleuvenCode() {
		return this.kuleuvenCode;
	}

	public void setKuleuvenCode(String kuleuvenCode) {
		this.kuleuvenCode = kuleuvenCode;
	}

	@Column(name = "note")
	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	@Column(name = "bactStatus", length = 50)
	public String getBactStatus() {
		return this.bactStatus;
	}

	public void setBactStatus(String bactStatus) {
		this.bactStatus = bactStatus;
	}

	@Column(name = "preIndexingStatus", length = 50)
	public String getPreIndexingStatus() {
		return this.preIndexingStatus;
	}

	public void setPreIndexingStatus(String preIndexingStatus) {
		this.preIndexingStatus = preIndexingStatus;
	}

	@Column(name = "virusIndexingStatus", length = 50)
	public String getVirusIndexingStatus() {
		return this.virusIndexingStatus;
	}

	public void setVirusIndexingStatus(String virusIndexingStatus) {
		this.virusIndexingStatus = virusIndexingStatus;
	}

	@Column(name = "flags", nullable = false)
	public int getFlags() {
		return this.flags;
	}

	public void setFlags(int flags) {
		this.flags = flags;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "material")
	public Set<Treatment> getTreatments() {
		return this.treatments;
	}

	public void setTreatments(Set<Treatment> treatments) {
		this.treatments = treatments;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "material")
	public Set<ActivityMaterial> getActivityMaterials() {
		return this.activityMaterials;
	}

	public void setActivityMaterials(Set<ActivityMaterial> activityMaterials) {
		this.activityMaterials = activityMaterials;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "material")
	public Mtstag getMtstag() {
		return this.mtstag;
	}

	public void setMtstag(Mtstag mtstag) {
		this.mtstag = mtstag;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "materialByChildId")
	public Set<Mtsmaterial> getMtsmaterialsForChildId() {
		return this.mtsmaterialsForChildId;
	}

	public void setMtsmaterialsForChildId(
			Set<Mtsmaterial> mtsmaterialsForChildId) {
		this.mtsmaterialsForChildId = mtsmaterialsForChildId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "materialByMtsmaterialId")
	public Set<Mtsmaterial> getMtsmaterialsForMtsmaterialId() {
		return this.mtsmaterialsForMtsmaterialId;
	}

	public void setMtsmaterialsForMtsmaterialId(
			Set<Mtsmaterial> mtsmaterialsForMtsmaterialId) {
		this.mtsmaterialsForMtsmaterialId = mtsmaterialsForMtsmaterialId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "material")
	public Set<PreIndexingTag> getPreIndexingTags() {
		return this.preIndexingTags;
	}

	public void setPreIndexingTags(Set<PreIndexingTag> preIndexingTags) {
		this.preIndexingTags = preIndexingTags;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "material")
	public Set<PreIndexingResultTag> getPreIndexingResultTags() {
		return this.preIndexingResultTags;
	}

	public void setPreIndexingResultTags(
			Set<PreIndexingResultTag> preIndexingResultTags) {
		this.preIndexingResultTags = preIndexingResultTags;
	}

}
